<?php 
class indexAction extends sfAction{
	public function execute($request){
		$data = array();
		$data['pagination'] = array(
			'page'		=> $request->getParameter('page', 1),
			'limit'		=> sfConfig::get('app_limit_news'),
			'total'		=> News::getIndexCount(),
			'router'	=> 'news',
			'params'	=> array()
		);
		$data['news'] = News::getIndexNews($data['pagination']);
		
		$this->setVar('data', $data);
	}
}